﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="三分厂探伤统计录入.aspx.cs" Inherits="syc.Inspection.三分厂探伤统计录入" %>

<head id="Head1" runat="server">
    <title></title>
</head>
<body >
<script type="text/javascript" language="javascript" src="/common.js"></script>
    <form id="form1" runat="server" >
     <div id="wintop" class="wintop" >三分厂探伤统计录入</div>
    <asp:Panel ID="Panel1" runat="server" CssClass="panel">
    <asp:Button ID="Button_Finish" runat="server" Text="保 存" CssClass="button" 
        UseSubmitBehavior="False" onclick="Button_Finish_Click" />
    <input type="button" value="关 闭" class="button" onclick="parent.swin2_close();" />
    <asp:SqlDataSource 
            ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
            DeleteCommand="DELETE FROM [三分厂探伤统计] WHERE [ID] = @ID" 
            InsertCommand="INSERT INTO [三分厂探伤统计] ([日期], [产品类别ID], [班次], [加工数], [合格数], [不合格数], [不合格原因],[供货单位]) VALUES (@日期, @产品类别ID, @班次, @加工数, @合格数, @不合格数, @不合格原因,@供货单位)" 
            SelectCommand="SELECT * FROM [三分厂探伤统计] " 
            UpdateCommand="UPDATE [三分厂探伤统计] SET [日期] = @日期, [产品类别ID] = @产品类别ID, [班次] = @班次,  [加工数] = @加工数, [合格数] = @合格数, [不合格数] = @不合格数, [供货单位]=@供货单位,[不合格原因] = @不合格原因 WHERE [ID] = @ID">
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int32" />
            </DeleteParameters>          
            <InsertParameters>
                <asp:ControlParameter ControlID="RiQi" PropertyName="Text" DbType="Date" Name="日期" />
                <asp:ControlParameter ControlID="ChangJia" PropertyName="SelectedValue" DbType="Int32" Name="供货单位" />
                <asp:ControlParameter ControlID="ChanPin" PropertyName="SelectedValue" Name="产品类别ID" Type="Int32" />
                <asp:ControlParameter ControlID="BanCi" PropertyName="SelectedValue" Name="班次" Type="Int32" />                       
                <asp:ControlParameter ControlID="JGS" PropertyName="Text" Name="加工数" Type="Int32" />
                <asp:ControlParameter ControlID="HGS" PropertyName="Text" Name="合格数" Type="Int32" />
                <asp:ControlParameter ControlID="BHGS" PropertyName="Text" Name="不合格数" Type="Int32" />
                <asp:ControlParameter ControlID="BZ"  PropertyName="Text" Name="不合格原因" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
    </asp:Panel>
     <asp:Panel ID="Panel4" runat="server" CssClass="panel2">
        <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
    </asp:Panel>
<asp:Panel ID="Panel2" runat="server" CssClass="panel" HorizontalAlign="Center">
日 期：<asp:TextBox ID="RiQi" runat="server" CssClass="textbox" Font-Size="13px" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('RiQi').value, document.getElementById('RiQi'));" />
<span style="margin-left:15px;"></span>

班 次：<asp:DropDownList ID="BanCi" runat="server" Width="120px">
    <asp:ListItem Value="1">甲班</asp:ListItem>
    <asp:ListItem Value="2">乙班</asp:ListItem>
    <asp:ListItem Value="3">丙班</asp:ListItem>
    <asp:ListItem Value="4">丁班</asp:ListItem>
</asp:DropDownList>
<span style="margin-left:25px;"></span>
产 品：<asp:DropDownList ID="ChanPin" runat="server" Width="140px">
    <asp:ListItem Value="3">油管接箍光管(J55)</asp:ListItem>
    <asp:ListItem Value="4" Selected="True">套管接箍光管(J55)</asp:ListItem>
    <asp:ListItem Value="103">油管接箍光管(N80)</asp:ListItem>
    <asp:ListItem Value="104">套管接箍光管(N80)</asp:ListItem>
</asp:DropDownList> 
</asp:Panel>
<asp:Panel ID="Panel3" runat="server" CssClass="panel" HorizontalAlign="Center">
    加工数：<asp:TextBox ID="JGS" runat="server" CssClass="textbox" Font-Size="13px" Width="120px" onKeyPress="if (event.keyCode!=46  && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false">0</asp:TextBox>
<span style="margin-left:20px;"></span>&nbsp;合格数：  <asp:TextBox ID="HGS" 
        runat="server" CssClass="textbox" Font-Size="13px" Width="120px" onKeyPress="if (event.keyCode!=46  && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false">0</asp:TextBox>
<span style="margin-left:20px;"></span>不合格数：<asp:TextBox ID="BHGS" runat="server" CssClass="textbox" Font-Size="13px" Width="120px" onKeyPress="if (event.keyCode!=46  && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false">0</asp:TextBox>
  </asp:Panel>  
<asp:Panel ID="Panel5" runat="server" CssClass="panel" HorizontalAlign="Center">
供货单位：
<asp:DropDownList ID="ChangJia" runat="server" Width="120px" 
DataSourceID="SqlDataSource3" DataTextField="名称" DataValueField="ID">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" 
           ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
           SelectCommand="SELECT [ID], [名称] FROM [原料供货单位]">
</asp:SqlDataSource>
  不合格原因： <asp:TextBox ID="BZ" runat="server" Width="318px"></asp:TextBox>
</asp:Panel>

    </form>
</body>
</html>